package net.realsee.mapper.wcs.warehouse;

import net.realsee.common.enums.wcs.charact.WcsCharactEnum;
import net.realsee.domain.wcs.data.bo.WcsUnitCharactBo;
import net.realsee.domain.wcs.warehouse.WcsWarehouseLocation;
import net.realsee.domain.wcs.warehouse.bo.LocationFullInfoBo;
import net.realsee.domain.wcs.warehouse.vo.WcsWarehouseLocationVo;
import net.realsee.framework.core.mapper.BaseMapperPlus;
import net.realsee.gcl.domain.bo.ccs.GclCcsOperateResult;
import net.realsee.gcl.domain.bo.ccs.GclCcsRequestParams;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 库位Mapper接口
 *
 * @author realsee
 * @date 2023-08-11
 */
public interface WcsWarehouseLocationMapper extends BaseMapperPlus<WcsWarehouseLocationMapper, WcsWarehouseLocation, WcsWarehouseLocationVo> {

    /**
     * 通过库位查询库位完整信息
     */
    LocationFullInfoBo getFullInfoByLocation(@Param("location") String location);

    /**
     * 根据库位编号更新库位状态
     * @param location
     * @param status
     */
    void updateWarehouseStatus(@Param("location") String location, @Param("status") Integer status);

    /**
     * 根据库位编号、任务号，查询该库位的任务状态
     * @param requestParams
     * @return
     */
    GclCcsOperateResult queryWarehouseLocTaskStatus(GclCcsRequestParams requestParams);

    /**
     * 根据库位查询传感器距离
     * @param location
     * @return
     */
    List<WcsUnitCharactBo> getSensorDistance(String location);

    /**
     * 通过库位号和特性，查询特性值
     */
    String getValueByLocationAndCharact(@Param("location") String location, @Param("charact") String charact);
}
